import {
    SET_ADDRESS, SET_TOKEN, SET_USERINFO
} from '../constants/positioning'

export const set_address = (payload = {}) => {
    return {
        type: SET_ADDRESS,
        payload
    }
}
export const set_token = (payload = {}) => {
    return {
        type: SET_TOKEN,
        payload
    }
}
export const set_userinfo = (payload = {}) => {
    return {
        type: SET_USERINFO,
        payload
    }
}

// 异步的action
export function asyncAdd() {
    return dispatch => {
        setTimeout(() => {
            // dispatch(add())
        }, 2000)
    }
}
